import 'package:flutter/material.dart';
import 'package:xianyu_app/Widgets/myAppBar.dart';
import 'Widgets/chioceContainer.dart';
import 'Widgets/secondContainer.dart';

class indexPage extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Scaffold(
      appBar: MyAppBar(),
      body: MyListview(),
    );
  }
}
//首页内容为一个大的listview，要添加的心控件的时候直接在children中添加即可
class MyListview extends StatelessWidget{
  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return Container(
      //设置主题背景色为渐变色
      decoration: BoxDecoration(
        gradient: LinearGradient(
            colors: [
              Colors.amberAccent,
              Color.fromARGB(100, 220, 220, 220)
        ],
          begin: Alignment.topCenter,
          end: Alignment.center
        )
      ),
      child: ListView(
        children: <Widget>[
          //这里是需要添加到首页的部件
          choiceContainer(),
          SecondContainer()
        ],
      ),
    );
  }
}


